package com.huawang.mdesign.model.service.constant;

import com.huawang.business.constants.DiagramConstants;
import com.huawang.core.semantics.entity.adorment.ElementStyle;
import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.Objects;

/**
 * @author admin
 */

@Getter
@AllArgsConstructor
public enum NavigationChainEnum {

    SUPPORTS_CAPABILITY_BY_ACTUAL_RESOURCE(
            "supportsCapabilityByActualResource",
            "通过实际资源支撑能力",
            "Supports Capability By Actual Resource",
            new ElementStyle("rgba(247, 40, 12, 1)",null)
    ),
    SUPPORTS_CAPABILITY_BY_ACTUAL_RESOURCE_AND_RESOURCE_PERFORMER(
            "supportsCapabilityByActualResourceAndResourcePerformer",
            "通过实际资源和资源执行者支撑能力",
            "Supports Capability By Actual Resource And Resource Performer",
            new ElementStyle("rgba(216, 151, 20, 1)",null)
    ),
    SUPPORTS_CAPABILITY_BY_RESOURCE_PERFORMER(
            "supportsCapabilityByResourcePerformer",
            "通过资源执行者支撑能力",
            "Supports Capability By Resource Performer",
            null
    ),
    SUPPORTS_CAPABILITY_BY_VERSION_WITHDRAWN_RESOURCE_PERFORMER(
            SUPPORTS_CAPABILITY_BY_RESOURCE_PERFORMER.key + "_supportsCapabilityByVersionWithdrawn",
            "通过已撤回版本支撑能力(资源执行者)",
            "Supports Capability By Version Withdrawn Of Resource Performer",
            new ElementStyle("rgba(129, 230, 20, 1)","5 5")
    ),
    SUPPORTS_CAPABILITY_BY_VERSION_RELEASED_RESOURCE_PERFORMER(
            SUPPORTS_CAPABILITY_BY_RESOURCE_PERFORMER.key + "_supportsCapabilityByVersionReleased",
            "通过已发布版本支撑能力(资源执行者)",
            "Supports Capability By Version Released Of Resource Performer",
            new ElementStyle("rgba(8, 112, 228, 1)",null)
    ),
    SUPPORTS_CAPABILITY_BY_SERVICE(
            "supportsCapabilityByService",
            "通过服务来支撑能力",
            "Supports Capability By Service",
            null
    ),
    SUPPORTS_CAPABILITY_BY_VERSION_WITHDRAWN_SERVICE(
            SUPPORTS_CAPABILITY_BY_SERVICE.key + "_supportsCapabilityByVersionWithdrawn",
            "通过已撤回版本支撑能力(服务)",
            "Supports Capability By Version Withdrawn Of Service",
            new ElementStyle("rgba(29, 50, 239, 1)","5 5")
    ),
    SUPPORTS_CAPABILITY_BY_VERSION_RELEASED_SERVICE(
            SUPPORTS_CAPABILITY_BY_SERVICE.key + "_supportsCapabilityByVersionReleased",
            "通过已发布版本支撑能力(服务)",
            "Supports Capability By Version Released Of Service",
            new ElementStyle("rgba(22, 5, 46, 1)","3 3")
    ),
    RESOURCE_PERFORMERS_REALIZATION_BY_SERVICE_INTERFACES(
            "ResourcePerformersRealizationByServiceInterfaces",
            "通过服务接口实现资源执行者",
            "Resource Performers realization by Service Interfaces",
            null
    ),
    RESOURCE_TO_OPERATIONAL_ACTIVITIES(
            "ResourcesToOperationalActivities",
            "运营活动的资源",
            "Resources To Operational Activities",
            null
    )

    ;

    private final String key;

    private final String label;

    private final String enLabel;

    private final ElementStyle style;

    public ElementStyle getStyle() {
        return Objects.isNull(style) ? DiagramConstants.MATRIX_DEFAULT_STYLE : style;
    }
}
